﻿using System;
using System.Collections;
namespace Moonlite.Platform.Text.File
{
    public static class AvailableProperties
    {
        private static Hashtable properties = new Hashtable();
        public static Hashtable Properties
        {
            get { return properties; }
            set { properties = value; }
        }

        public static string ProjectName
        {
            get { return Properties["ProjectName"] as string; }
            set { Properties["ProjectName"] = value; }
        }

        public static string FileName
        {
            get { return Properties["FileName"] as string; }
            set { Properties["FileName"] = value; }
        }

        public static string Package
        {
            get { return Properties["Package"] as string; }
            set { Properties["Package"] = value; }
        }

        public static string GetProperty(string name)
        {
            if (Properties.ContainsKey(name) == true)
            {
                return Properties[name] as string;
            }

            return null;
        }

        public static void SetProperty(string name, string value)
        {
            if (Properties.ContainsKey(name) == false)
            {
                Properties.Add(name, value);
                return;
            }

            Properties[name] = value;
        }

        static AvailableProperties()
        {
            Properties.Add("ProjectName", "");
            Properties.Add("FileName", "");
            Properties.Add("Package", "");
        }
    }
}
